package fr.grassaud.hmvc.sample.extended;

import fr.grassaud.hmvc.component.Child;
import fr.grassaud.hmvc.component.ControlledModel;
import fr.grassaud.hmvc.component.Controller;
import fr.grassaud.hmvc.component.ViewExtended;
import fr.grassaud.hmvc.event.HMVCEvent;
import fr.grassaud.hmvc.event.OnViewEvent;
import fr.grassaud.hmvc.sample.SampleController;

@Controller
@ViewExtended(ExtendedSampleView.class)
public class ExtendedController extends SampleController {

    @ControlledModel
    private ExtendedModel model; 
    
    @OnViewEvent(name="extended")
    public void extend(HMVCEvent event) {
	 
	model.extendModel();
    }
    
    
    
    @OnViewEvent(name="addChild")
    public void addChild(@Child(name="child")SampleController controller, HMVCEvent event) {
	controller.receiveViewEvent(event);
	
	
    }
}
